Skip to content

fix(knowledge): 再次发布时保留最新卡片并软删旧卡片 - #2878

Merged
likaiaki merged 1 commit into
feat/2.5.0-sgfrom
fix/2.5.0-sg-publish-newest-card
Dec 3, 2026
Merged

likaiaki merged 1 commit into
feat/2.5.0-sgfrom
fix/2.5.0-sg-publish-newest-card

Conversation

@likaiaki

@likaiaki likaiaki commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 同一个来源库再次合并发布时,最新发布卡片成为唯一有效入口,科室库文件删除后撤回到这张卡片。
  • 旧卡片标成「已失效:已被新的发布替代」,继续留在知识库列表里。
  • 删除旧卡片只打删除时间,不进回收站。收藏和对话里保存的旧编号会打开当前这张有效卡片。

Test plan

  • 个人库把文件发布到科室库,再把一份新文件合并到同一文档。个人库里新卡片可打开,旧卡片显示「已失效:已被新的发布替代」。
  • 删除旧卡片后,列表里消失,回收站没有这条记录。科室库文件和新卡片仍在。
  • 收藏或对话里点开旧卡片编号,打开的是当前有效卡片。
  • pytest test/knowledge/test_knowledge_document_distribution_publish.py::test_publish_merge_keeps_existing_source_space_publish_entry test/knowledge/test_superseded_publish_reason.py
  • 门户列表能看到「已失效:已被新的发布替代」。

Made with Cursor

A repeated merge should leave the latest publish entry as the only valid entrance. The previous card stays listed as superseded, and deleting it only sets a delete time so it never enters the recycle bin.

Co-authored-by: Cursor <cursoragent@cursor.com>
@likaiaki
likaiaki merged commit 3e87cb6 into feat/2.5.0-sg Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant